import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
// @ts-ignore
import autoprefixer from 'autoprefixer';
// @ts-ignore
import proxy from './proxy';
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [react()],
    server: {
        proxy: proxy,
        port: 8080
    },
    resolve: {
        alias: {
            '@': '/src'
        }
    },
    build: {
        outDir: 'build'
    },
    css: {
        postcss: {
            plugins: [
                autoprefixer({
                    overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8', '> 1%']
                })
            ]
        },
        preprocessorOptions: {
            less: {
                javascriptEnabled: true
            }
        }
    }
});
